import { request } from '@umijs/max';

export async function loadUser(): Promise<App.User | null> {
  return await request<App.User>('/api/resources/user/my')
    .catch(err=>{
      return null;
    });
}
